package com.weixin.paleituo.activity;

import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.weixin.paleituo.R;
import com.weixin.paleituo.application.BaseApplication;
import com.weixin.paleituo.base.BaseActivity;

/**
 * Author yichao
 * Time  2018/5/8 17:58
 * Dest  楼盘详情基类
 */

public abstract class HouseDetailsBaseActivity extends BaseActivity {

    ImageView mIvMessageActivityHouseDetails;
    LinearLayout mLlHeadrootActivityHouseDetails;
    FrameLayout mFlActivtyHousedetailsBase;
    ImageView mIvBackActivityHouseDetails;

    @Override
    protected void initView() {
        setContentView(R.layout.actvity_housedetails_base);
        View mContentView = getContentView(this);
        mFlActivtyHousedetailsBase=   findViewById(R.id.fl_activty_housedetails_base);
        mFlActivtyHousedetailsBase.addView(mContentView);

        findViewById(R.id.iv_message_activity_house_details).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (BaseApplication.isLoginSuccess){
                    MyMessageActivity.startActivity(HouseDetailsBaseActivity.this,BaseApplication.getUserId());
                }else {
                    LoginActivity.startActivity(HouseDetailsBaseActivity.this,true);

                }
            }
        });
        findViewById(R.id.iv_back_activity_house_details).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });


    }

    @Override
    protected void initData() {
        super.initData();

    }

    protected abstract View getContentView(HouseDetailsBaseActivity houseDetailsBaseActivity);





}
